package com.ktkj.init.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * <p>
 * 字典表
 * </p>
 *
 * @author ktkj
 * @since 2020-09-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Dict extends BaseEntity {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 父id
     */
    private Long parentId;

    /**
     * 级别
     */
    private Integer level;

    /**
     * 描述
     */
    private String descs;

    /**
     * 类型
     */
    private String type;

    /**
     * 节点类型(dir：目录 data：数据)
     */
    private String manageType;

    @TableField(exist = false)
    private List<Dict> childrenList;

    @TableField(exist = false)
    private Dict parent;

    @TableField(exist = false)
    private String parentDescs;
}
